<template>
  <div class="page_root" :key="queryUpdateFlag" data-page-name="集团周报" data-page-identification="n_gz5i3dyd3b">
    <a-spin :spinning="pageLoading.loading" :tip="pageLoading.tip">
      <!-- begin vid_afzck0abne 删除成功 -->
      <!-- end vid_afzck0abne 删除成功 -->
      <!-- begin vid_yg7qhtj748 新建成功 -->
      <!-- end vid_yg7qhtj748 新建成功 -->
      <!-- begin vid_movbz6xnud 编辑成功 -->
      <!-- end vid_movbz6xnud 编辑成功 -->
      <!-- begin vid_cowpzo31h6 删除失败 -->
      <!-- end vid_cowpzo31h6 删除失败 -->
      <!-- begin vid_vwybylqw7s 新建失败 -->
      <!-- end vid_vwybylqw7s 新建失败 -->
      <!-- begin vid_17q08hwpiw 编辑失败 -->
      <!-- end vid_17q08hwpiw 编辑失败 -->
      <!-- begin vid_vb56hcp798 新建 -->
      <a-modal
        class="vid_vb56hcp798"
        v-model:visible="vid_vb56hcp798_props.visible"
        :title="'新建'"
        :maskClosable="false"
        :centered="true"
        @cancel="handle_vid_vb56hcp798_cancel"
        @ok="handle_vid_vb56hcp798_ok"
      >
        <!-- begin vid_wpav3a5mbg 表单容器_8wshqdmzd8 -->
        <a-form ref="vid_wpav3a5mbg_ref" class="vid_wpav3a5mbg" :model="c_w70wwjgan4" :formModel="vid_wpav3a5mbg_props.formModel">
          <!-- begin vid_ykt56d40m0 表单项容器_3hdol4r1q5 -->
          <a-form-item name="a_si8uqsuriv" :rules="c_w70wwjgan4_rules[`a_si8uqsuriv`]" class="vid_ykt56d40m0" :label-col='{"span":4}' :wrapper-col='{"span":20}'>
            <!-- begin vid_upy93m7d7b 输入框_p1qyt8la6s -->
            <a-input autocomplete="off" class="vid_upy93m7d7b" v-model:value="c_w70wwjgan4.a_si8uqsuriv" :placeholder="'请输入'"> </a-input>
            <!-- end vid_upy93m7d7b 输入框_p1qyt8la6s -->
            <template #label>
              <!-- begin vid_4onx2kbrk0 周名字 -->
              <span class="vid_4onx2kbrk0"> 周名字 </span>
              <!-- end vid_4onx2kbrk0 周名字 -->
            </template>
          </a-form-item>
          <!-- end vid_ykt56d40m0 表单项容器_3hdol4r1q5 -->
          <!-- begin vid_1lluf12pky 表单项容器_zrks4szfdi -->
          <a-form-item name="t_va59alwq3c" :rules="c_w70wwjgan4_rules[`t_va59alwq3c`]" class="vid_1lluf12pky" :label-col='{"span":4}' :wrapper-col='{"span":20}'>
            <!-- begin vid_dh0efyyyx2 日期_ks8nt09ddz -->
            <a-date-picker
              class="vid_dh0efyyyx2"
              :getPopupContainer="(node) => node.parentNode"
              v-model:value="c_w70wwjgan4.t_va59alwq3c"
              :placeholder="'请选择'"
              :valueFormat="'YYYY-MM-DD'"
              :showTime="vid_dh0efyyyx2_props.showTime"
            >
            </a-date-picker>
            <!-- end vid_dh0efyyyx2 日期_ks8nt09ddz -->
            <template #label>
              <!-- begin vid_jab4s729x8 开始时间 -->
              <span class="vid_jab4s729x8"> 开始时间 </span>
              <!-- end vid_jab4s729x8 开始时间 -->
            </template>
          </a-form-item>
          <!-- end vid_1lluf12pky 表单项容器_zrks4szfdi -->
          <!-- begin vid_eaei7ne47z 表单项容器_120whhplng -->
          <a-form-item name="l_6au0jolm7h" :rules="c_w70wwjgan4_rules[`l_6au0jolm7h`]" class="vid_eaei7ne47z" :label-col='{"span":4}' :wrapper-col='{"span":20}'>
            <!-- begin vid_18awzxt6yd 日期_aew2vwekwg -->
            <a-date-picker
              class="vid_18awzxt6yd"
              :getPopupContainer="(node) => node.parentNode"
              v-model:value="c_w70wwjgan4.l_6au0jolm7h"
              :placeholder="'请选择'"
              :valueFormat="'YYYY-MM-DD'"
              :showTime="vid_18awzxt6yd_props.showTime"
            >
            </a-date-picker>
            <!-- end vid_18awzxt6yd 日期_aew2vwekwg -->
            <template #label>
              <!-- begin vid_2os7sgvhz6 结束时间 -->
              <span class="vid_2os7sgvhz6"> 结束时间 </span>
              <!-- end vid_2os7sgvhz6 结束时间 -->
            </template>
          </a-form-item>
          <!-- end vid_eaei7ne47z 表单项容器_120whhplng -->
        </a-form>
        <!-- end vid_wpav3a5mbg 表单容器_8wshqdmzd8 -->
      </a-modal>
      <!-- end vid_vb56hcp798 新建 -->
      <!-- begin vid_8mnmfa53pr 编辑 -->
      <a-modal
        class="vid_8mnmfa53pr"
        v-model:visible="vid_8mnmfa53pr_props.visible"
        :title="'编辑'"
        :maskClosable="false"
        :centered="true"
        @cancel="handle_vid_8mnmfa53pr_cancel"
        @ok="handle_vid_8mnmfa53pr_ok"
      >
        <!-- begin vid_nvp0ao3a1d 表单容器_7yafq22f1t -->
        <a-form class="vid_nvp0ao3a1d" :model="a_mo23g13hbh" :formModel="vid_nvp0ao3a1d_props.formModel">
          <!-- begin vid_o1ag3oflkm 表单项容器_k0h4ffpu0d -->
          <a-form-item name="x_i4jbtx5p90" :rules="a_mo23g13hbh_rules[`x_i4jbtx5p90`]" class="vid_o1ag3oflkm" :label-col='{"span":4}' :wrapper-col='{"span":20}'>
            <!-- begin vid_oczqxb58xj 输入框_gjw07m7gp4 -->
            <a-input autocomplete="off" class="vid_oczqxb58xj" v-model:value="a_mo23g13hbh.x_i4jbtx5p90" :placeholder="'请输入'"> </a-input>
            <!-- end vid_oczqxb58xj 输入框_gjw07m7gp4 -->
            <template #label>
              <!-- begin vid_4z7svvdgap 简单文本_11dn7a6kh4 -->
              <span class="vid_4z7svvdgap"> 周名字 </span>
              <!-- end vid_4z7svvdgap 简单文本_11dn7a6kh4 -->
            </template>
          </a-form-item>
          <!-- end vid_o1ag3oflkm 表单项容器_k0h4ffpu0d -->
          <!-- begin vid_vg4j4r46k2 表单项容器_orgrevyiui -->
          <a-form-item name="y_gpjdmvtbx9" :rules="a_mo23g13hbh_rules[`y_gpjdmvtbx9`]" class="vid_vg4j4r46k2" :label-col='{"span":4}' :wrapper-col='{"span":20}'>
            <!-- begin vid_9ozibww6vl 日期_663fd6e12n -->
            <a-date-picker
              class="vid_9ozibww6vl"
              :getPopupContainer="(node) => node.parentNode"
              v-model:value="a_mo23g13hbh.y_gpjdmvtbx9"
              :placeholder="'请选择'"
              :valueFormat="'YYYY-MM-DD'"
              :showTime="vid_9ozibww6vl_props.showTime"
            >
            </a-date-picker>
            <!-- end vid_9ozibww6vl 日期_663fd6e12n -->
            <template #label>
              <!-- begin vid_hfu1pkez51 简单文本_j43egr600f -->
              <span class="vid_hfu1pkez51"> 开始时间 </span>
              <!-- end vid_hfu1pkez51 简单文本_j43egr600f -->
            </template>
          </a-form-item>
          <!-- end vid_vg4j4r46k2 表单项容器_orgrevyiui -->
          <!-- begin vid_3i0q3aurah 表单项容器_nquml23zuk -->
          <a-form-item name="i_1ja08izrpx" :rules="a_mo23g13hbh_rules[`i_1ja08izrpx`]" class="vid_3i0q3aurah" :label-col='{"span":4}' :wrapper-col='{"span":20}'>
            <!-- begin vid_4mszcgwyxb 日期_cbk8qtq5nb -->
            <a-date-picker
              class="vid_4mszcgwyxb"
              :getPopupContainer="(node) => node.parentNode"
              v-model:value="a_mo23g13hbh.i_1ja08izrpx"
              :placeholder="'请选择'"
              :valueFormat="'YYYY-MM-DD'"
              :showTime="vid_4mszcgwyxb_props.showTime"
            >
            </a-date-picker>
            <!-- end vid_4mszcgwyxb 日期_cbk8qtq5nb -->
            <template #label>
              <!-- begin vid_ckh6eh6oet 简单文本_u7uk6k02p3 -->
              <span class="vid_ckh6eh6oet"> 结束时间 </span>
              <!-- end vid_ckh6eh6oet 简单文本_u7uk6k02p3 -->
            </template>
          </a-form-item>
          <!-- end vid_3i0q3aurah 表单项容器_nquml23zuk -->
        </a-form>
        <!-- end vid_nvp0ao3a1d 表单容器_7yafq22f1t -->
      </a-modal>
      <!-- end vid_8mnmfa53pr 编辑 -->
      <!-- begin vid_hs8r07us12 删除 -->
      <a-modal
        class="vid_hs8r07us12"
        v-model:visible="vid_hs8r07us12_props.visible"
        :centered="true"
        :title="'删除'"
        :maskClosable="false"
        :width="320"
        @cancel="handle_vid_hs8r07us12_cancel"
        @ok="handle_vid_hs8r07us12_ok"
      >
        <!-- begin vid_z3hs3gon7b 简单文本_1b783gdqz1 -->
        <span class="vid_z3hs3gon7b"> 确认删除此内容？ </span>
        <!-- end vid_z3hs3gon7b 简单文本_1b783gdqz1 -->
      </a-modal>
      <!-- end vid_hs8r07us12 删除 -->
      <!-- begin vid_3ukeh4i2oc 容器_5iy5htznhs -->
      <al-box class="vid_3ukeh4i2oc">
        <!-- begin vid_skmzgi4gny 布局容器_d9bjhfxbu6 -->
        <a-row class="vid_skmzgi4gny" :slots="'12:12'">
          <a-col :span="12">
            <!-- begin vid_y2xau4ei63 集团周报详情列表 -->
            <span class="vid_y2xau4ei63"> 集团周报详情列表 </span>
            <!-- end vid_y2xau4ei63 集团周报详情列表 -->
          </a-col>
          <a-col :span="12">
            <!-- begin vid_sw7axyi13e 容器_fxq8ij8wbc -->
            <al-box class="vid_sw7axyi13e">
              <!-- begin vid_dtbaq1vvsj 新建 -->
              <a-button class="vid_dtbaq1vvsj" :type="'primary'" @click="handle_vid_dtbaq1vvsj_click"> 新建 </a-button>
              <!-- end vid_dtbaq1vvsj 新建 -->
            </al-box>
            <!-- end vid_sw7axyi13e 容器_fxq8ij8wbc -->
          </a-col>
        </a-row>
        <!-- end vid_skmzgi4gny 布局容器_d9bjhfxbu6 -->
        <!-- begin vid_c4ax6m0que 容器_2igunto7cy -->
        <al-box class="vid_c4ax6m0que">
          <!-- begin vid_wkmwgrqg8y 表格_z44yu5tjqr -->
          <!-- 表格_z44yu5tjqr -->
          <a-table
            class="vid_wkmwgrqg8y"
            :bordered="true"
            :editRowSaveLoading="vid_wkmwgrqg8y_props.editRowSaveLoading"
            :sorter="vid_wkmwgrqg8y_props.sorter"
            :currentRow="vid_wkmwgrqg8y_props.currentRow"
            :selectedRowList="vid_wkmwgrqg8y_props.selectedRowList"
            :data-source="vid_wkmwgrqg8y_options()"
            @change="handle_vid_wkmwgrqg8y_change"
            :columns="vid_wkmwgrqg8y_columns"
            :pagination="vid_wkmwgrqg8y_pagination"
            row-key="id"
            @resizeColumn="(w, col) => handleResizeColumn(w, col, 'vid_wkmwgrqg8y')"
            sticky
            :scroll="{ x: 'max-content', scrollToFirstRowOnChange: true, }"
            :row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped-even' : 'table-striped-odd')"
          >
            <template #headerCell="{ title, column }">
              <TableHeaderCell :title="title" :column="column" />
            </template>
            <template #bodyCell="{ text, column, record, index }">
              <!-- 操作列 -->
              <div v-if="column.dataIndex === 'vid_wkmwgrqg8y_operation'" class="operation-cell">
                <!-- 默认分组 -->
                <span>
                  <a-button type="link" @click="handle_vid_wkmwgrqg8y_clickBtn_cpdcd44mua(record)">编辑</a-button>
                  <a-button type="link" @click="handle_vid_wkmwgrqg8y_clickBtn_2aibg08ay2(record)">详情</a-button>
                </span>
              </div>

              <!-- 序号列 -->
              <template v-if="column && column.dataIndex === 'vid_wkmwgrqg8y_serialNumber'">
                {{ index + 1 }}
              </template>
              <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"周名字"} 列内容 -->
              <template v-if="column.dataIndex === 'weekName' && !column.customRender">
                <text-table-cell
                  :rowData="record"
                  :conditionValueMap="vid_wkmwgrqg8y_props.boundaryValueMap"
                  :dataSource="vid_wkmwgrqg8y_props.contentDataSource[column.dataIndex]"
                  :columnsConfig="column"
                  :value="text"
                />
              </template>
              <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"开始时间"} 列内容 -->
              <template v-if="column.dataIndex === 'weekStartDate' && !column.customRender">
                <text-table-cell
                  :rowData="record"
                  :conditionValueMap="vid_wkmwgrqg8y_props.boundaryValueMap"
                  :dataSource="vid_wkmwgrqg8y_props.contentDataSource[column.dataIndex]"
                  :columnsConfig="column"
                  :value="text"
                />
              </template>
              <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"结束时间"} 列内容 -->
              <template v-if="column.dataIndex === 'weekEndDate' && !column.customRender">
                <text-table-cell
                  :rowData="record"
                  :conditionValueMap="vid_wkmwgrqg8y_props.boundaryValueMap"
                  :dataSource="vid_wkmwgrqg8y_props.contentDataSource[column.dataIndex]"
                  :columnsConfig="column"
                  :value="text"
                />
              </template>
              <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"附件"} 列内容 -->
              <template v-if="column.dataIndex === 'custom4' && !column.customRender">
                <text-table-cell
                  :rowData="record"
                  :conditionValueMap="vid_wkmwgrqg8y_props.boundaryValueMap"
                  :dataSource="vid_wkmwgrqg8y_props.contentDataSource[column.dataIndex]"
                  :columnsConfig="column"
                  :value="text"
                />
              </template>
              <!-- {"type":"value","dataType":"STRING","rawDataType":"STRING","link":"","value":"id"} 列内容 -->
              <template v-if="column.dataIndex === 'id' && !column.customRender">
                <text-table-cell
                  :rowData="record"
                  :conditionValueMap="vid_wkmwgrqg8y_props.boundaryValueMap"
                  :dataSource="vid_wkmwgrqg8y_props.contentDataSource[column.dataIndex]"
                  :columnsConfig="column"
                  :value="text"
                />
              </template>
            </template>
          </a-table>
          <!-- end vid_wkmwgrqg8y 表格_z44yu5tjqr -->
        </al-box>
        <!-- end vid_c4ax6m0que 容器_2igunto7cy -->
      </al-box>
      <!-- end vid_3ukeh4i2oc 容器_5iy5htznhs -->
    </a-spin>
  </div>
</template>
<script setup lang="tsx">
  import {
      h, ref, reactive, toRaw, markRaw, watch, computed,
      onBeforeMount, onMounted, onBeforeUnmount, onUnmounted, onActivated, onDeactivated
    } from "vue";
    import { useRoute, useRouter } from 'vue-router';
    const router = useRouter();
    const route = useRoute();
    import { get, post, put, del, request, requestWithHeaders } from '@/utils/http/Axios';
    import { cloneDeep, localGet, merge, getDifferenceArray, traversalTreeStructure, checkCaseCondition, renderStringInTemplate, handleBreadcrumbJump, throttle, permission, getComponentParamsValue } from '@/utils/index';
    import { isNullOrEmpty, isEmptyArr, isNullOrUnDef, isContained, isArray, isEmpty, isObject } from '@/utils/is';
    import dayjs from 'dayjs';
    import { getPagePcChartsDataSourceConvert } from '@/utils/chart';
    import { message, notification, Modal } from 'ant-design-vue'
    import { propertyFormatByNumber, propertyFormatByPercentage, propertyFormatByDate, parseSubFromDataList } from '@/utils/format';
    import colorTheme from '@/design/custom-theme.json';
    
    import UserTableRecords from '@/model/UserTableRecords';
    import { getAppBaseUrl } from '@/utils/index';
    import { sendToken } from "@/hooks/useIframeToken";
    import { useSystemStore } from "@/store/modules/system";
    const systemStore = useSystemStore();
    

  import TextTableCell from '@/components/page/tableCell/text.vue';
  import TooltipTableCell from '@/components/page/tableCell/tooltip.vue';
  import NumberTableCell from '@/components/page/tableCell/number.vue';
  import ProgressTableCell from '@/components/page/tableCell/progress.vue';
  import OptionsTableCell from '@/components/page/tableCell/options.vue';
  import MultipleOptionsTableCell from '@/components/page/tableCell/multipleOptions.vue';
  import DatePickerTableCell from '@/components/page/tableCell/datePicker.vue';
  import RangePickerTableCell from '@/components/page/tableCell/rangePicker.vue';
  import RangeNumberTableCell from '@/components/page/tableCell/rangeNumber.vue';
  import BoolTableCell from '@/components/page/tableCell/bool.vue';
  import TableHeaderCell from '@/components/page/TableHeaderCell.vue';

      // 获取传入的流程ID和组件参数
      const props = defineProps({
            'processInstanceId': {
            type: [String,Number,Boolean],
            default: undefined,
        },
      })
      const immediateWatch = (source, callback) => {
        watch(source, callback, {deep: true,immediate: true })
      }



  /* -------------------------- 属性定义 -------------------------- */

      const setTimeOutList = [];
      const pageLoading = reactive({
        loading: false,
        tip: undefined
      });
      const authInfo = localGet('app-user-store');

    const vid_afzck0abne_props = reactive({
          show: false,
      type: "success",
      content: "删除成功",
      duration: 3,
  })

    const vid_yg7qhtj748_props = reactive({
          show: false,
      type: "success",
      content: "新建成功",
      duration: 3,
  })

    const vid_movbz6xnud_props = reactive({
          show: false,
      type: "success",
      content: "编辑成功",
      duration: 3,
  })

    const vid_cowpzo31h6_props = reactive({
          show: false,
      type: "error",
      content: "删除失败",
      duration: 3,
  })

    const vid_vwybylqw7s_props = reactive({
          show: false,
      type: "error",
      content: undefined,
      duration: 3,
  })

    const vid_17q08hwpiw_props = reactive({
          show: false,
      type: "error",
      content: undefined,
      duration: 3,
  })

    const vid_vb56hcp798_props = reactive({
          visible: false,
  })

    const vid_wpav3a5mbg_props = reactive({
          formModel: {"a_si8uqsuriv":"","t_va59alwq3c":"","l_6au0jolm7h":""},
  })

    const vid_upy93m7d7b_props = reactive({
          value: "",
  })

    const vid_dh0efyyyx2_props = reactive({
          showTime: undefined,
      value: "",
  })

    const vid_18awzxt6yd_props = reactive({
          showTime: undefined,
      value: "",
  })

    const vid_8mnmfa53pr_props = reactive({
          visible: false,
  })

    const vid_nvp0ao3a1d_props = reactive({
          formModel: {"x_i4jbtx5p90":"","y_gpjdmvtbx9":"","i_1ja08izrpx":""},
  })

    const vid_oczqxb58xj_props = reactive({
          value: undefined,
  })

    const vid_9ozibww6vl_props = reactive({
          showTime: undefined,
      value: undefined,
  })

    const vid_4mszcgwyxb_props = reactive({
          showTime: undefined,
      value: undefined,
  })

    const vid_hs8r07us12_props = reactive({
          visible: false,
  })

    const vid_wkmwgrqg8y_props = reactive({
          systemSort: [],
      sorter: {},
      editRowSaveLoading: {},
      currentRow: {"weekName":"","weekStartDate":"","weekEndDate":"","custom4":"","id":""},
      selectedRowList: {"checkEntry":[],"checkEntryId":[],"serialNumber":[],"projectPhaseId":[],"createTime":[],"projectPhaseName":[],"checkCastingName":[],"updateTime":[],"custom1":[],"custom2":[],"custom3":[],"custom4":[],"weekName":[],"weekStartDate":[],"weekEndDate":[],"id":[]},
      totalNumber: undefined,
      rt_tableConfig: {"layout":{"showHeader":true,"sticky":true,"operationColumnFixed":"right"},"pagination":{"current":1,"pageSizeOptions":"10,20,30,40","enable":true,"showTotal":true,"hideOnSinglePage":false,"pageSize":"12","simple":false,"sync":true,"showQuickJumper":true,"showSizeChanger":false},"scroll":{"x":"max-content","y":"","scrollToFirstRowOnChange":true},"style":{"contentStyle":{"borderColor":"#D9D9D9","enableContentStyle":true,"fontFamily":"arial, helvetica, \"microsoft yahei\"","lintHeight":40,"borderWidth":1,"evenLineBackColor":"#F8FAFC","textWeight":"400","fontSize":14,"oddLineBackColor":"#FFFFFF","textColor":"#262626"},"paginationStyle":{"layout":"bottomRight","size":"default"},"headerStyle":{"borderColor":"#D9D9D9","backgroundColor":"#3875FF","fontFamily":"arial, helvetica, \"microsoft yahei\"","lintHeight":40,"borderWidth":1,"textWeight":"600","fontSize":14,"enableTextStyle":true,"textColor":"#FFFFFF"}},"basic":{"rowSelection":false,"rowEdit":{"cancelText":"取消","editText":"编辑","saveText":"保存"},"title":"","showSequenceNumber":true,"rowKey":"id"}},
      columnList: [
          {
            dataIndex: 'vid_wkmwgrqg8y_serialNumber',
            title: '序号',
            resizable: true,
          },
          {
            id: '6igxpr7q8q',
            dataIndex: 'weekName',
            headerComment: false,
            title: '周名字',
            ellipsis: false,
            headerOverflow: 'ellipsis',
            contentAlign: 'left',
            customHeaderCell: () => ({ style: { 'text-align': 'left' } }),
            rowEditConditions: [],
            contentType: 'TEXT',
            contentConfig: {"format":null,"defaultStyle":null,"conditionStyle":[],"dataSourceConfig":null,"boolConfig":"collection"},
            // 使用插槽的列，设置单元格padding为0，padding样式在内容插槽中已加，以便内容插槽设置背景色时可以占满整个单元格；该样式会在计算属性生成列配置时加入customCell
            customCellStyle: { padding: 0 },
            resizable: true,
          },
          {
            id: 'k7y5knkr9c',
            dataIndex: 'weekStartDate',
            headerComment: false,
            title: '开始时间',
            ellipsis: false,
            headerOverflow: 'ellipsis',
            contentAlign: 'left',
            customHeaderCell: () => ({ style: { 'text-align': 'left' } }),
            rowEditConditions: [],
            contentType: 'TEXT',
            contentConfig: {"format":null,"defaultStyle":null,"conditionStyle":[],"dataSourceConfig":null,"boolConfig":"collection"},
            // 使用插槽的列，设置单元格padding为0，padding样式在内容插槽中已加，以便内容插槽设置背景色时可以占满整个单元格；该样式会在计算属性生成列配置时加入customCell
            customCellStyle: { padding: 0 },
            resizable: true,
          },
          {
            id: 'j11s381oc5',
            dataIndex: 'weekEndDate',
            headerComment: false,
            title: '结束时间',
            ellipsis: false,
            headerOverflow: 'ellipsis',
            contentAlign: 'left',
            customHeaderCell: () => ({ style: { 'text-align': 'left' } }),
            rowEditConditions: [],
            contentType: 'TEXT',
            contentConfig: {"format":null,"defaultStyle":null,"conditionStyle":[],"dataSourceConfig":null,"boolConfig":"collection"},
            // 使用插槽的列，设置单元格padding为0，padding样式在内容插槽中已加，以便内容插槽设置背景色时可以占满整个单元格；该样式会在计算属性生成列配置时加入customCell
            customCellStyle: { padding: 0 },
            resizable: true,
          },
          {
            dataIndex: 'vid_wkmwgrqg8y_operation',
            title: '操作',
            fixed: 'right',
          },
        ],
      rawColumnList: [],
      // 进行行合并所需的排序规则，必须将其加到排序字段的前面，以实现合并单元格
      rowMergeSort: [],
      // 完整的排序规则：需要将行合并的排序规则和排序字段的排序规则赋给该属性；调接口时会使用其作为排序条件
      systemSort: [],
      // 条件格式需要的边界值映射：key为边界值id，value为边界值数据
      boundaryValueMap: {},
      // 表格单元格内容渲染需要的外部数据源：key为列，value为该列单元格的外部数据源配置
      contentDataSource: {},
  })
  // ---------------------------- 定义模型数据 ----------------------------

    const c_w70wwjgan4 = reactive({"a_si8uqsuriv":"","t_va59alwq3c":"","l_6au0jolm7h":""})


    const a_mo23g13hbh = reactive({})

    // ============================ 定义模型数据 ============================




    const c_w70wwjgan4_rules = reactive({
          a_si8uqsuriv: [
          { required: true, message: '请输入周名字!', trigger: 'blur' },
      ],
      t_va59alwq3c: [
          { required: true, message: '请选择开始时间!', trigger: 'blur' },
      ],
      l_6au0jolm7h: [
          { required: true, message: '请选择结束时间!', trigger: 'blur' },
      ],
    })





    const a_mo23g13hbh_rules = reactive({
          x_i4jbtx5p90: [
          { required: true, message: '请输入周名字!', trigger: 'blur' },
      ],
      y_gpjdmvtbx9: [
          { required: true, message: '请选择开始时间!', trigger: 'blur' },
      ],
      i_1ja08izrpx: [
          { required: true, message: '请选择结束时间!', trigger: 'blur' },
      ],
    })


      // 处理校验
      const setSubFormName =(parentInfo, name)=>{
        return [parentInfo.parents, parentInfo.cycleIndex, name];
      }


    const vid_wkmwgrqg8y_options_raw = ref([])

      const vid_wkmwgrqg8y_options = computed(() => {
        return () => vid_wkmwgrqg8y_options_raw.value
      })

  // 图表组件 表格_z44yu5tjqr 条件格式数据依赖
  const vid_wkmwgrqg8y_chartConditionDependencyMap = ref({
  })
  /* ========================== 属性定义 ========================== */


  /* -------------------------- 元素数据引用 -------------------------- */
  // 组件 表单容器_8wshqdmzd8 ref 的引用
  const vid_wpav3a5mbg_ref = ref(null);

  /* ========================== 元素数据引用 ========================== */


  /* -------------------------- 页面数据 -------------------------- */

    // 页面数据 检索周报
    const dataConnector_conn_m7l1p88jd1_response = ref();
    const dataConnector_conn_m7l1p88jd1 = async (additionParams = {}) => {
        const exec = async () => {
          // 获取参数
          const params = {
            orderBy: 'week_start_date DESC',
          conditions: []
          };

          // 注入附加的参数
          try {
            merge(params, additionParams);
          } catch (error) {
            console.log(error)
          }

          // 判断加载提示

          // 处理URL
          let url = '/solution-ppm/api/v2/built-in-system-ppm/week_record/search';
          // 替换url中的变量

          // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
          Object.keys(params).forEach(key=>{ if(params[key] === null){ delete params[key] }else if( Object.prototype.toString.call(params[key]) === '[object Object]' ){ Object.keys(params[key]).forEach(childKey=>{ if(params[key][childKey] === null || (Array.isArray(params[key][childKey]) && params[key][childKey].length === 1 && isNullOrUnDef(params[key][childKey]?.[0]))){ delete params[key][childKey] }}) } });
          return post(url, params, {
                headers: {}
              }).then(async (resp) => {
            dataConnector_conn_m7l1p88jd1_response.value = resp;

            return resp;
          }).catch(async (e) => {


            return Promise.reject(e);
          }).finally(async () => {


          })
        }

          return await exec()

    }


    // 页面数据 新建周报
    const dataConnector_conn_94u3qlxedc_response = ref();
    const dataConnector_conn_94u3qlxedc = async (additionParams = {}) => {
        const exec = async () => {
          // 获取参数
          const params = {
            weekStartDate: c_w70wwjgan4.t_va59alwq3c,
          weekName: c_w70wwjgan4.a_si8uqsuriv,
          weekEndDate: c_w70wwjgan4.l_6au0jolm7h
          };

          // 注入附加的参数
          try {
            merge(params, additionParams);
          } catch (error) {
            console.log(error)
          }

          // 判断加载提示

          // 处理URL
          let url = '/solution-ppm/api/v2/built-in-system-ppm/week_record';
          // 替换url中的变量

          // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
          Object.keys(params).forEach(key=>{ if(params[key] === null){ delete params[key] }else if( Object.prototype.toString.call(params[key]) === '[object Object]' ){ Object.keys(params[key]).forEach(childKey=>{ if(params[key][childKey] === null || (Array.isArray(params[key][childKey]) && params[key][childKey].length === 1 && isNullOrUnDef(params[key][childKey]?.[0]))){ delete params[key][childKey] }}) } });
          return post(url, params, {
                headers: {}
              }).then(async (resp) => {
            dataConnector_conn_94u3qlxedc_response.value = resp;

            return resp;
          }).catch(async (e) => {


            return Promise.reject(e);
          }).finally(async () => {


          })
        }

          return await exec()

    }


    // 页面数据 修改周报
    const dataConnector_conn_zew6nywb5g_response = ref();
    const dataConnector_conn_zew6nywb5g = async (additionParams = {}) => {
        const exec = async () => {
          // 获取参数
          const params = {
            weekStartDate: a_mo23g13hbh.y_gpjdmvtbx9,
          id: vid_wkmwgrqg8y_props?.currentRow.id,
          weekName: a_mo23g13hbh.x_i4jbtx5p90,
          weekEndDate: a_mo23g13hbh.i_1ja08izrpx
          };

          // 注入附加的参数
          try {
            merge(params, additionParams);
          } catch (error) {
            console.log(error)
          }

          // 判断加载提示

          // 处理URL
          let url = '/solution-ppm/api/v2/built-in-system-ppm/week_record/{id}';
          // 替换url中的变量
          url = url.replace('{id}', String(vid_wkmwgrqg8y_props?.currentRow.id))
          // 排除空参数  日期组件重置后的空参数是[null] 或者[undefined]
          Object.keys(params).forEach(key=>{ if(params[key] === null){ delete params[key] }else if( Object.prototype.toString.call(params[key]) === '[object Object]' ){ Object.keys(params[key]).forEach(childKey=>{ if(params[key][childKey] === null || (Array.isArray(params[key][childKey]) && params[key][childKey].length === 1 && isNullOrUnDef(params[key][childKey]?.[0]))){ delete params[key][childKey] }}) } });
          return put(url, params, {
                headers: {}
              }).then(async (resp) => {
            dataConnector_conn_zew6nywb5g_response.value = resp;

            return resp;
          }).catch(async (e) => {


            return Promise.reject(e);
          }).finally(async () => {


          })
        }

          return await exec()

    }


  /* ========================== 页面数据 ========================== */



  /* -------------------------- 响应 -------------------------- */

    // 页面交互 新建周报提示
    const response_pwlxj6u7ix = async () => {

    const branchList = [{
          conditionType: 'EQUALS',
          value: 'fail',
          exec: async () => {
              vid_vwybylqw7s_props.show = true;
          }
      },{
          conditionType: 'EQUALS',
          value: 'success',
          exec: async () => {
              vid_yg7qhtj748_props.show = true;
  vid_vb56hcp798_props.visible = false;
  await dataConnector_conn_m7l1p88jd1()
          }
      }];

    const matchBranch = branchList.find(item => checkCaseCondition(dataConnector_conn_94u3qlxedc_response?.value?.status, item.conditionType, item.value));
    // 匹配到的分支
    if (matchBranch) {
      matchBranch.exec();
      return;
    }
    // 默认分支动作


    }


    // 页面交互 修改周报提示
    const response_4f755ynwl7 = async () => {

    const branchList = [{
          conditionType: 'EQUALS',
          value: 'fail',
          exec: async () => {
              vid_17q08hwpiw_props.show = true;
          }
      },{
          conditionType: 'EQUALS',
          value: 'success',
          exec: async () => {
              vid_movbz6xnud_props.show = true;
  vid_8mnmfa53pr_props.visible = false;
  await dataConnector_conn_m7l1p88jd1()
          }
      }];

    const matchBranch = branchList.find(item => checkCaseCondition(dataConnector_conn_zew6nywb5g_response?.value?.status, item.conditionType, item.value));
    // 匹配到的分支
    if (matchBranch) {
      matchBranch.exec();
      return;
    }
    // 默认分支动作


    }


    // 页面交互 详情
    const response_qfhmr9lgsl = async () => {

    const query = {
      weekId: vid_wkmwgrqg8y_props?.currentRow.id
    };
    let appBaseUrl = '';
    
    appBaseUrl = getAppBaseUrl()
    
    const jumpInfo = {
      path: `${appBaseUrl}/app_50000005/page/3000001050`, // 跳转地址
      query
    };
    const routeUrl = router.resolve(jumpInfo);
    let url = routeUrl.href;
    // 判断是否是MicroApp的子应用
    const microAppData = window.microApp?.getData() ?? window.eventCenterForViteApp?.getData();
    if (microAppData) {
      const urlList = []
      Object.keys(jumpInfo.query).forEach(item=>{
        urlList.push(item + '=' + jumpInfo.query[item]);
      })
      // 判断要跳转的地址是否是用户自定义输入的
      const customJumpPath = jumpInfo.path;

      // 自定义跳转页面不是其他平台的菜单，则直接使用全路径
       if (customJumpPath.indexOf('/allin-app/') !== -1) {
        // 目标页面是其他平台的菜单
        const realPath = customJumpPath.split('/allin-app/').pop()
        // 兼容二级域名情况
        let jumpPath = (microAppData.baseroute ?? '/allin-app') + '/' + realPath
        // 配置有参数，需要加参数添加到路由后面
        if(urlList.length) {
          // 跳转的路径本身带有参数
          if(jumpPath.indexOf('?') !== -1) {
            jumpPath += '&' + urlList.join("&");
          } else {
            jumpPath += '?'+ urlList.join("&");
          }
        }
        url = location.origin + jumpPath;
      } else {
        // 目标页面就是低代码项目本身的页面
        if(location.href.indexOf('/allin-app/') > -1) {
          url = location.origin + location.pathname.split("/allin-app/").shift() + '/allin-app'+ url;
        } else {
          url = location.origin + '/allin-app'+ url;
        }
      }
    }
    // 打开新窗口
    window.open(url, '_blank');

    }

  /* ========================== 响应 ========================== */


  /* -------------------------- 函数 -------------------------- */

  /* ========================== 函数 ========================== */


  /* -------------------------- 页面参数 -------------------------- */

    const pageParameter_state = reactive({
        'processInstanceId': props.processInstanceId ?? route.query.processInstanceId,
    })

  /* ========================== 页面参数 ========================== */


  /* -------------------------- 组件事件处理方法 -------------------------- */

    // ---------------------------- 组件数据同步 ----------------------------
    // 处理 新建失败 的 content 属性关联
  watch(() => dataConnector_conn_94u3qlxedc_response?.value?.message,
    () => {
      let dataList = dataConnector_conn_94u3qlxedc_response?.value?.message

      vid_vwybylqw7s_props.content = dataList;
    },
    {deep: true})
  // 处理 编辑失败 的 content 属性关联
  watch(() => dataConnector_conn_zew6nywb5g_response?.value?.message,
    () => {
      let dataList = dataConnector_conn_zew6nywb5g_response?.value?.message

      vid_17q08hwpiw_props.content = dataList;
    },
    {deep: true})
  // 处理 输入框_gjw07m7gp4 的 value 属性关联
  immediateWatch(
    () => vid_wkmwgrqg8y_props?.currentRow.weekName,
    () => { a_mo23g13hbh.x_i4jbtx5p90 = vid_wkmwgrqg8y_props?.currentRow.weekName; }
  )
  // 处理 日期_663fd6e12n 的 value 属性关联
  immediateWatch(
    () => vid_wkmwgrqg8y_props?.currentRow.weekStartDate,
    () => { a_mo23g13hbh.y_gpjdmvtbx9 = vid_wkmwgrqg8y_props?.currentRow.weekStartDate; }
  )
  // 处理 日期_cbk8qtq5nb 的 value 属性关联
  immediateWatch(
    () => vid_wkmwgrqg8y_props?.currentRow.weekEndDate,
    () => { a_mo23g13hbh.i_1ja08izrpx = vid_wkmwgrqg8y_props?.currentRow.weekEndDate; }
  )
  // 处理 表格_z44yu5tjqr 的 systemList 属性关联
  watch(() => dataConnector_conn_m7l1p88jd1_response?.value?.data,
    () => {
      let dataList = dataConnector_conn_m7l1p88jd1_response?.value?.data

      vid_wkmwgrqg8y_options_raw.value = dataList;
    },
    {deep: true})
    // ============================ 组件数据同步 ============================

  /**
  * 处理元素 对话框 的 cancel 事件
  */
  let handle_vid_vb56hcp798_cancel = throttle(async (...params) => {
  vid_vb56hcp798_props.visible = false;
  }, 500)
  /**
  * 处理元素 对话框 的 ok 事件
  */
  let handle_vid_vb56hcp798_ok = throttle(async (...params) => {
  await dataConnector_conn_94u3qlxedc()
  response_pwlxj6u7ix()
  }, 500)
  /**
  * 处理元素 对话框 的 cancel 事件
  */
  let handle_vid_8mnmfa53pr_cancel = throttle(async (...params) => {
  vid_8mnmfa53pr_props.visible = false;
  }, 500)
  /**
  * 处理元素 对话框 的 ok 事件
  */
  let handle_vid_8mnmfa53pr_ok = throttle(async (...params) => {
  await dataConnector_conn_zew6nywb5g()
  response_4f755ynwl7()
  }, 500)
  /**
  * 处理元素 对话框 的 cancel 事件
  */
  let handle_vid_hs8r07us12_cancel = throttle(async (...params) => {
  vid_hs8r07us12_props.visible = false;
  }, 500)
  /**
  * 处理元素 对话框 的 ok 事件
  */
  let handle_vid_hs8r07us12_ok = throttle(async (...params) => {
  vid_hs8r07us12_props.visible = false;
  }, 500)
  /**
  * 处理元素 按钮 的 click 事件
  */
  let handle_vid_dtbaq1vvsj_click = throttle(async (...params) => {
  // 这里组件可能还未初始化， 这里使用可选链的形式进行函数触发
  try {
  await vid_wpav3a5mbg_ref.value?.resetFields();
  } catch (error) { console.log(error);}
  vid_vb56hcp798_props.visible = true;
  }, 500)
  /**
  * 处理元素 表格 的 clickBtn_cpdcd44mua 事件
  */
  let handle_vid_wkmwgrqg8y_clickBtn_cpdcd44mua = throttle(async (...params) => {
  // 存储表格当前行数据
  const [record] = params;
  vid_wkmwgrqg8y_props.currentRow = record;
  vid_8mnmfa53pr_props.visible = true;
  }, 500)
  /**
  * 处理元素 表格 的 clickBtn_2aibg08ay2 事件
  */
  let handle_vid_wkmwgrqg8y_clickBtn_2aibg08ay2 = throttle(async (...params) => {
  // 存储表格当前行数据
  const [record] = params;
  vid_wkmwgrqg8y_props.currentRow = record;
  response_qfhmr9lgsl()
  }, 500)
  /**
  * 处理元素 表格 的 change 事件
  */
  let handle_vid_wkmwgrqg8y_change = throttle(async (...params) => {
  // 处理分页器相关数据
  const [pagination, filters, sorter] = params;
  const { current, pageSize } = pagination;
  vid_wkmwgrqg8y_props.rt_tableConfig.pagination.current = current;
  vid_wkmwgrqg8y_props.rt_tableConfig.pagination.pageSize = pageSize;
  // 处理排序相关数据
  const { field, order } = sorter;
  const sorterList = [...vid_wkmwgrqg8y_props.rowMergeSort];
  let sorterValue = {};
  if (order === 'descend') {
  sorterValue = { order: field, direction: 'DESC' }
  } else if (order === 'ascend') {
  sorterValue = { order: field, direction: 'ASC' }
  }
  sorterList.push(sorterValue);
  vid_wkmwgrqg8y_props.systemSort = sorterList;
  vid_wkmwgrqg8y_props.sorter = sorterValue;
  }, 500)
  /* ========================== 组件事件处理方法 ========================== */


  /* -------------------------- 生命周期 -------------------------- */
  // 用于参数变更后重新执行自定义指令
      const queryUpdateFlag = ref(0);
      onMounted(() => { ;dataConnector_conn_m7l1p88jd1()

    });

    onUnmounted(() => {
      // 销毁定时器
      setTimeOutList.forEach(({ repeat, timer }) => {
        repeat ?  clearInterval(timer): clearTimeout(timer);
      });
    });

  /* ========================== 生命周期 ========================== */


  /* -------------------------- 数据关联处理 -------------------------- */

      // 处理 删除成功 全局消息
        immediateWatch(
            () => vid_afzck0abne_props.show,
            () => {
                if (vid_afzck0abne_props.show) {
                    message[vid_afzck0abne_props.type](vid_afzck0abne_props.content, vid_afzck0abne_props.duration, () => {
                        vid_afzck0abne_props.show = false
                    })
                }
            }
        )
  // 处理 新建成功 全局消息
        immediateWatch(
            () => vid_yg7qhtj748_props.show,
            () => {
                if (vid_yg7qhtj748_props.show) {
                    message[vid_yg7qhtj748_props.type](vid_yg7qhtj748_props.content, vid_yg7qhtj748_props.duration, () => {
                        vid_yg7qhtj748_props.show = false
                    })
                }
            }
        )
  // 处理 编辑成功 全局消息
        immediateWatch(
            () => vid_movbz6xnud_props.show,
            () => {
                if (vid_movbz6xnud_props.show) {
                    message[vid_movbz6xnud_props.type](vid_movbz6xnud_props.content, vid_movbz6xnud_props.duration, () => {
                        vid_movbz6xnud_props.show = false
                    })
                }
            }
        )
  // 处理 删除失败 全局消息
        immediateWatch(
            () => vid_cowpzo31h6_props.show,
            () => {
                if (vid_cowpzo31h6_props.show) {
                    message[vid_cowpzo31h6_props.type](vid_cowpzo31h6_props.content, vid_cowpzo31h6_props.duration, () => {
                        vid_cowpzo31h6_props.show = false
                    })
                }
            }
        )
  // 处理 新建失败 全局消息
        immediateWatch(
            () => vid_vwybylqw7s_props.show,
            () => {
                if (vid_vwybylqw7s_props.show) {
                    message[vid_vwybylqw7s_props.type](vid_vwybylqw7s_props.content, vid_vwybylqw7s_props.duration, () => {
                        vid_vwybylqw7s_props.show = false
                    })
                }
            }
        )
  // 处理 编辑失败 全局消息
        immediateWatch(
            () => vid_17q08hwpiw_props.show,
            () => {
                if (vid_17q08hwpiw_props.show) {
                    message[vid_17q08hwpiw_props.type](vid_17q08hwpiw_props.content, vid_17q08hwpiw_props.duration, () => {
                        vid_17q08hwpiw_props.show = false
                    })
                }
            }
        )



  /* -------------------------- 表单数据同步 -------------------------- */
  /* ========================== 表单数据同步 ========================== */

  /* ========================== 数据关联处理 ========================== */


  /* -------------------------- 不同组件自定义的处理逻辑 -------------------------- */
  onMounted(() => {
    const rawColumnList = []
    traversalTreeStructure(vid_wkmwgrqg8y_props.columnList, (node) => {
      if (node.type === 'column') {
        rawColumnList.push(node)
      }
    });
    
    // 获取缓存的表格列宽度，处理列宽信息
    UserTableRecords.getTableRecords(localGet('al__UID')).then((res) => {
      const columnWidthMap = res['vid_wkmwgrqg8y'] ?? {};
      rawColumnList.map((column) => {
        if(columnWidthMap[column.dataIndex]) {
          column.width = columnWidthMap[column.dataIndex]
        }
      })
    });
    
    vid_wkmwgrqg8y_props.rawColumnList = rawColumnList;
  })
  // 生成表格列：相同分组的数据需要合并单元格
  const vid_wkmwgrqg8y_columns = computed(() => {
    // 需要合并单元格的列
    const groupKeys = [];

    // 将表头配置按照groupTitle字段进行分组，以实现多级表头
    const columnList = [...vid_wkmwgrqg8y_props.columnList];
    function formatColumns(columns) {
      columns.forEach(item => {
        const { dataIndex, contentAlign, children, customCellStyle } = item;
        // 如果当前列是分组列，则递归处理它的子列，当前列本身不作处理
        if (!dataIndex && children && children.length) {
          formatColumns(children);
          return;
        }

        const groupIndex = groupKeys.findIndex(item => item === dataIndex);
        // 如果当前字段属于分组字段，则给它添加合并单元格的配置，否则直接返回
        if (groupIndex === -1) {
          item.customCell = (record, index) => {
            return { style: { 'text-align': contentAlign, ...(customCellStyle || {}) } };
          };
        } else {
          item.customCell = (record, index) => {
            const rowGroupKeys = groupKeys.slice(0, groupIndex + 1);
            const rowSpanList = generateRowSpanList(vid_wkmwgrqg8y_options.value(), rowGroupKeys,vid_wkmwgrqg8y_props.editRecordMap);
            return { rowSpan: rowSpanList[index], style: { 'text-align': contentAlign, ...(customCellStyle || {}) } };
          };
        }
      })
    }

    // 格式化column：增加合并单元格的配置，以及自定义样式
    formatColumns(columnList);

    return columnList;
  });


    // 表格分页器信息：将总条数信息加到基础分页信息中
    const vid_wkmwgrqg8y_pagination = computed(() => {
      const { totalNumber, rt_tableConfig } = vid_wkmwgrqg8y_props;
      const {
        enable = true,
        current= 1,
        pageSize= 10,
        showSizeChanger= false,
        pageSizeOptions= '10,20,30,40',
        showTotal= false,
        showQuickJumper= false,
        simple= false,
        hideOnSinglePage= false,
      } = rt_tableConfig.pagination ?? {};
      const { size = 'default', layout='bottomRight' } = rt_tableConfig?.style?.paginationStyle || {}
      let info = {};
      if(enable) {
        info = {
          total: totalNumber || 0,
          pageSize,
          size,
          simple,
          current,
          showSizeChanger,
          pageSizeOptions: pageSizeOptions.split(','),
          showQuickJumper,
          hideOnSinglePage,
          position: [layout],
        }
        if(showTotal) {
          info.showTotal = (total, range) => `共${total}个项目，第${current}/${Math.ceil(total / pageSize)}页`
        }
        return info;
      }
      return false;
    })


        // 补充一个watch，用于监听删除最后一页最后一条数据的情况，然后重新加载数据
        watch(() => dataConnector_conn_m7l1p88jd1_response?.value?.data, (newValue) => {
          const current = vid_wkmwgrqg8y_props.rt_tableConfig.pagination.current;
          if (!newValue?.length && current > 1) {
            vid_wkmwgrqg8y_props.rt_tableConfig.pagination.current = current - 1;
            dataConnector_conn_m7l1p88jd1();
          }
        });
  /**
   * 生成分组字段合并单元格的配置：返回值为一个数字数组，数组里面每一项即为该字段当前行的rowSpan配置
   * @param {Array} 表格中的数据
   * @param {Array} 当前分组字段的列表，注：为了保证优先级低的字段合并后是优先级高的字段合并后的子集，需要把比该字段优先级高的分组字段按顺序放在该字段前面；例如：所有分组字段列表为['grade', 'age', 'score']，要生成age字段的合并单元格配置，则该参数需要传['grade', 'age']
   * @returns {Array} 该字段合并单元格的rowSpan配置，例：[1, 1, 2, 0, 1]
   */
  function generateRowSpanList(dataSource, groupKeys,editRecordMap) {
    if (!dataSource || !dataSource.length) {
      return [];
    }

    const rowSpanList = [];

    // 判断单元格是否需要合并的临时值：使用表格数据最后一行进行初始化（表格数据的遍历是倒序进行的）
    let tempValue = getGroupValue(dataSource[dataSource.length - 1], groupKeys);
    // 记录需要合并单元格的数量
    let tempValueCount = 0;

    // 倒序遍历数组，以保证使用最前面一条数据合并单元格
    for (let index = dataSource.length - 1; index >= 0; index--) {
      rowSpanList[index] = 0;
      const groupValue = getGroupValue(dataSource[index], groupKeys);
      // 如果当前行的分组数据跟上一行一致，则将标记数量加一；否则将标记数量的当前值赋给上一条数据，并重置临时值和标记数量
      if(editRecordMap && editRecordMap[index]){ //如果当前行是编辑行
        rowSpanList[index + 1] = tempValueCount;
        tempValue = "";
        tempValueCount=1;
      }
      else if (groupValue === tempValue) {
        tempValueCount++;
      } else {
        rowSpanList[index + 1] = tempValueCount;
        tempValue = groupValue;
        tempValueCount = 1;
      }

      // 遍历到最后一行，将当前的标记数量赋给当前行
      if (index === 0) {
        rowSpanList[index] = tempValueCount;
      }
    }

    return rowSpanList;
  }

  /**
   * 根据分组字段列表生成当前数据行的分组值
   * @param {Object} 当前数据行
   * @param {Array} 分组字段列表
   * @returns {String} 拼装的当前数据行的分组值，例：record为{ age: 7, grade: '一年级', name: '小赵' }，groupKeys为['grade', 'age']，则拼装后的返回值为'一年级__$__7'
   */
  function getGroupValue(record, groupKeys) {
    const groupValueList = [];
    groupKeys.forEach(groupKey => {
      let val = record[groupKey]
      if (isArray(val)) {
        val = record[groupKey + '_labels']
      } else if (isObject(val)) {
        console.warn('警告表格列数据为object，可能导致行合并异常，列key为：'+ groupKey,val)
      }
      groupValueList.push(`${val}`);
    });
    return groupValueList.join('__$__');
  }

  /**
   * 将列表数据转换成树状数据
   * @param {Array} 原始的列表数据
   * @param {String|Number} 列表数据的唯一key
   * @param {String|Number} 列表数据转成树时的父级id
  */
  function convertListToTree(list, key, parentKey) {
    const clonedList = cloneDeep(list || []);

    // 遍历列表数据，生成树节点的map：key为列表数据的唯一key，value为列表当前行的数据
    const treeNodeMap = {};
    clonedList.forEach(item => {
      treeNodeMap[item[key]] = item;
    });

    const treeDataList = [];
    clonedList.forEach(item => {
      // 如果当前行数据的父级id不在树节点的map中，则当前数据为根节点数据，将其加入最终树形数据的列表；否则将其放入其父节点数据的children中
      if (!treeNodeMap[item[parentKey]]) {
        treeDataList.push(item);
      } else {
        if (!treeNodeMap[item[parentKey]].children) {
          treeNodeMap[item[parentKey]].children = [];
        }
        treeNodeMap[item[parentKey]].children.push(item);
      }
    });

    return treeDataList;
  }

  /**
   * 表格列宽伸缩处理，使用indexedDB缓存伸缩后的列宽度
   */
  const handleResizeColumn = (w, col, vid) => {
    col.width = w;
    
    UserTableRecords.saveTableRecords(col, localGet('al__UID'), vid)
    
  }
  /* ========================== 不同组件自定义的处理逻辑 ========================== */


  // ================================定制化逻辑========================================
</script>
<style lang="less" scoped>
  .page_root {
  width: 100%;
  height: 100%;
  overflow: auto;
  }
  .page_root :deep(.@{ant-prefix}-spin-nested-loading),
  .page_root :deep(.@{ant-prefix}-spin-container)
   {
      height: 100%;
  }
  .page_root :deep(.@{ant-prefix}-spin-container .@{ant-prefix}-table-wrapper)
   {
      display: flex;
      flex-flow: column nowrap;
      justify-content: flex-start;
  }
  .page_root :deep(.@{ant-prefix}-table)
   {
    flex: auto;
    overflow: auto;
  }
  .table-moreBtn_down {
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100px;
  }

  .table-moreBtn_menu :deep(.table-moreBtn_menu-item):hover {
    background: #ebf1ff;
  }

  /*  表格树结构样式处理，展开按钮层级增加*/
  :deep(.@{ant-prefix}-table-row-expand-icon) {
    z-index: 1;
  }
  /*  表格树结构 由于每个表格项采用自定义组件，使用绝对定位布局，开启树结构导致显示异常，暂时使用层级定位位置 */
  :deep(.@{ant-prefix}-table-row-level-1 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 15px !important;
    width: calc(100% - 15px);
  }
  :deep(.@{ant-prefix}-table-row-level-2 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 30px !important;
    width: calc(100% - 30px);
  }
  :deep(.@{ant-prefix}-table-row-level-3 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 45px !important;
    width: calc(100% - 45px);
  }
  :deep(.@{ant-prefix}-table-row-level-4 .@{ant-prefix}-table-cell-with-append .cell-wrapper-left) {
    left: 60px !important;
    width: calc(100% - 60px);
  }

  /* 穿梭框改变默认样式，为根据组件样式控制左右栏宽度。 */
  :deep(.@{ant-prefix}-transfer-list)
   {
      height: 100%;
      width: 50%;
  }
  .vid_wpav3a5mbg{
      display:block
  }
  .vid_upy93m7d7b{
      box-shadow:0px 0px 0px 0px
  }
  .vid_dh0efyyyx2 :deep(input) {
        cursor: undefined;
      }
  .vid_dh0efyyyx2{
      width:100%
  }
  .vid_eaei7ne47z{
      margin-bottom:0px
  }
  .vid_18awzxt6yd :deep(input) {
        cursor: undefined;
      }
  .vid_18awzxt6yd{
      width:100%
  }
  .vid_nvp0ao3a1d{
      display:block
  }
  .vid_oczqxb58xj{
      box-shadow:0px 0px 0px 0px
  }
  .vid_9ozibww6vl :deep(input) {
        cursor: undefined;
      }
  .vid_9ozibww6vl{
      width:100%
  }
  .vid_3i0q3aurah{
      margin-bottom:0px
  }
  .vid_4mszcgwyxb :deep(input) {
        cursor: undefined;
      }
  .vid_4mszcgwyxb{
      width:100%
  }

  .vid_3ukeh4i2oc{
      width:100%;
      height:100%;
      display:block;
      padding-top:16px;
      padding-right:24px;
      padding-bottom:24px;
      padding-left:24px;
      background-color:#FFFFFF
  }
  .vid_skmzgi4gny{
      width:100%;
      display:flex;
      flex-direction:row;
      align-items:center;
      flex-wrap:undefined;
      margin-bottom:16px
  }
  .vid_y2xau4ei63{
      padding-left:8px;
      font-weight:600;
      color:rgba(38, 38, 38, 1);
      font-size:16px;
      line-height:16px;
      border-left-style:solid;
      border-left-width:4px;
      border-left-color:#3875FF
  }
  .vid_sw7axyi13e{
      width:100%;
      display:flex;
      flex-direction:row;
      justify-content:flex-end;
      flex-wrap:undefined
  }
  .vid_dtbaq1vvsj{
      background-color:#3875FF;
      box-shadow:0px 0px 0px 0px ;
      border-style:solid;
      border-color:#3875FF
  }
  .vid_c4ax6m0que{
      box-shadow:0px 0px 0px 0px
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-thead) > tr {
      height: 40px;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-thead) > tr > th {
    background: #3875FF;
    font-size: 14px;
    font-family: arial, helvetica, "microsoft yahei";
    font-weight: 600;
    color: #FFFFFF;
    border-bottom:1px solid #D9D9D9;
    padding: 8px 16px;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container .@{ant-prefix}-table-thead > tr:not(:last-child) > th {
    border-bottom:1px solid #D9D9D9;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container .@{ant-prefix}-table-thead > tr > th {
    border-right:1px solid #D9D9D9;
  }
  /* 将表格自带的左边框取消，方便设置表头边框颜色和内容边框颜色 */
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container {
    border-left: none;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container .@{ant-prefix}-table-thead > tr > th[colstart='0']:first-child {
    border-left:1px solid #D9D9D9;
  }
  /* 开启粘性表头后，表格结构会发生变化 需另外处理 */
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container .@{ant-prefix}-table-header table {
    border-top:1px solid #D9D9D9;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container > .@{ant-prefix}-table-content > table {
    border-top:1px solid #D9D9D9;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-thead) > tr > th:not(:last-child):not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan])::before {
      background: #D9D9D9;
      width: 1px;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-cell-scrollbar) {
      box-shadow: none;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-tbody) tr {
    height: 40px;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-tbody) tr > td {
    font-size: 14px;
    font-family: arial, helvetica, "microsoft yahei";
    font-weight: 400;
    color: #262626;
    border-bottom:1px solid #D9D9D9;
    padding: 0 16px;
    word-break: break-all;
    .cell-wrapper {
      padding: 0 16px;
    }
  }

  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-tbody) tr > td .cell-wrapper {
    padding: 0 16px;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-empty .@{ant-prefix}-table-tbody tr > td) {
    padding: 0;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-tbody) tr > td .@{ant-prefix}-btn {
    padding: 0 30px 0 0;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table-tbody) tr > td .@{ant-prefix}-btn:last-child {
    padding: 0;
  }
  .vid_wkmwgrqg8y :deep(.table-striped-odd) td {
    background-color: #FFFFFF;
  }
  .vid_wkmwgrqg8y :deep(.table-striped-even) td {
    background-color: #F8FAFC;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container .@{ant-prefix}-table-tbody tr > td {
    border-right:1px solid #D9D9D9;
  }
  .vid_wkmwgrqg8y :deep(.@{ant-prefix}-table.@{ant-prefix}-table-bordered) .@{ant-prefix}-table-container .@{ant-prefix}-table-tbody tr > td:first-child {
    border-left:1px solid #D9D9D9;
  }
  .vid_wkmwgrqg8y{
      width:100%;
      overflow-x:auto;
      overflow-y:auto
  }
  .vid_wkmwgrqg8y:active{
      width:100%
  }
  .vid_wkmwgrqg8y:focus{
      width:100%
  }
  .vid_wkmwgrqg8y:hover{
      width:100%
  }
</style>